<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>demo1</title>
</head>
<body>
<div id="example">
    <input v-model="message" value="LZUGIS">
    <p>Original message: "{{ message }}"</p>
    <p>Computed reversed message: "{{ reversedMessage }}"</p>
    <p>Method message: "{{ reversedStr() }}"</p>
</div>
<script src="vue.js"></script>
<script>
    var app = new Vue({
        el: '#example',
        data: {
            message: 'LZUGIS'
        },
        computed: {
            reversedMessage: function () {
                return this.message.split('').reverse().join('')
            }
        },
        methods: {
            reversedStr: function () {
                return this.message.split('').reverse().join(',')
            }
        }
    })
</script>
</body>
</html>